<template>
    <div>
        <el-container>
            <el-header>
                <f-header></f-header>
            </el-header>
            <el-container>
                <el-aside :style="{ width: userStore.asideWidth }">
                    <f-menu></f-menu>
                </el-aside>
                <el-main>
                    <f-main class="mb-5"></f-main>
                    <router-view v-slot="{ Component }">
                        <transition name="fade">
                            <keep-alive>
                                <component :is="Component"></component>
                            </keep-alive>
                        </transition>
                    </router-view>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>
<script setup>
import FHeader from './components/FHeader.vue';
import FMenu from './components/FMenu.vue';
import FMain from './components/FMain.vue';
import { useInfoStore } from '../store';
const userStore = useInfoStore();

</script>
<style scoped lang='scss'>
.el-header {
    padding: 0px;
    box-sizing: border-box;
}

.el-main {
    padding-top: 10px;
}

.el-aside {
    transition: all linear 0.2s;
}

.fade-enter-from {
    opacity: 0;
}

.fade-enter-to {
    opacity: 1;
}

.fade-leave-from {
    opacity: 1;
}

.fade-leave-to {
    opacity: 0;
}

.fade-enter-active {
    transition: all ease 0.2s;
}

.fade-enter-active {
    transition-delay: 0.2s;
}

.fade-leave-active {
    transition: all ease 0.2s;
}
</style>
